From: Roger Pau Monne Date: Tue, 26 Apr 2016 10:07:51 +0000 (+0200) Subject: libxl: fix passing the type argument to xc_psr_* X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1230 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=31268fea;p=xen.git libxl: fix passing the type argument to xc_psr_* The xc_psr_* functions expect the type to be xc_psr_cat_type instead of libxl_psr_cbm_type, so do the conversion. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu Release-acked-by: Wei Liu --- diff --git a/tools/libxl/libxl_psr.c b/tools/libxl/libxl_psr.c index 3d0dc61e92..40f2d5fe11 100644 --- a/tools/libxl/libxl_psr.c +++ b/tools/libxl/libxl_psr.c @@ -298,6 +298,7 @@ int libxl_psr_cat_set_cbm(libxl_ctx *ctx, uint32_t domid, uint64_t cbm) { GC_INIT(ctx); + BUILD_BUG_ON(sizeof(libxl_psr_cbm_type) != sizeof(xc_psr_cat_type)); int rc; int socketid, nr_sockets; @@ -310,7 +311,8 @@ int libxl_psr_cat_set_cbm(libxl_ctx *ctx, uint32_t domid, libxl_for_each_set_bit(socketid, *target_map) { if (socketid >= nr_sockets) break; - if (xc_psr_cat_set_domain_data(ctx->xch, domid, type, socketid, cbm)) { + if (xc_psr_cat_set_domain_data(ctx->xch, domid, (xc_psr_cat_type)type, + socketid, cbm)) { libxl__psr_cat_log_err_msg(gc, errno); rc = ERROR_FAIL; } @@ -328,7 +330,8 @@ int libxl_psr_cat_get_cbm(libxl_ctx *ctx, uint32_t domid, GC_INIT(ctx); int rc = 0; - if (xc_psr_cat_get_domain_data(ctx->xch, domid, type, target, cbm_r)) { + if (xc_psr_cat_get_domain_data(ctx->xch, domid, (xc_psr_cat_type)type, + target, cbm_r)) { libxl__psr_cat_log_err_msg(gc, errno); rc = ERROR_FAIL; }